package com.httpserv;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class HttpServer {
	
	public void start(int port, String basePath){
		try {
			ServerSocket ss = new ServerSocket(port);
			while(true){
				Socket socket = ss.accept();
			
				new Thread(new HttpProcess(socket, basePath)).start();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		new HttpServer().start(80,"D:\\my\\");
	}
}
